package cn.com.git.workflow.service;

import cn.com.git.common.util.generator.GeneratorEntity;
import cn.com.git.common.util.generator.MybatisGeneratorUtils;
import cn.com.git.common.util.object.StringUtil;
import org.apache.commons.lang.ObjectUtils;

import java.util.Arrays;
import java.util.List;

/**
 * Service 层 代码生成类
 * 	包括 api,serviceImpl,saveDTO,detailDTO
 * Created by zhangzhenfu
 */
public class GeneratorService {

	// 根据命名规范，只修改此常量值即可
	private static String PACKAGE_NAME = "cn.com.git.workflow";

	/**
	 * 自动代码生成
	 * @param args
	 */
	public static void main(String[] args) throws Exception {
		List<GeneratorEntity> entities = Arrays.asList(
				new GeneratorEntity("work_flow_config",StringUtil.lineToHump(ObjectUtils.toString("work_flow_config")),Integer.class,false),
				new GeneratorEntity("work_flow_group",StringUtil.lineToHump(ObjectUtils.toString("work_flow_group")),Integer.class,false)
		);
		MybatisGeneratorUtils.generatorService(PACKAGE_NAME,entities);

	}

}
